package com.mpaas.wtdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

public class MainActivity extends AppCompatActivity {

    private boolean isRelease = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        isRelease = BuildConfig.isRelease.equals("true");

        /**
         *测试环境打印数据
         * */
        if (isRelease) {
            Log.e("url", "www.baidu.com");
        }

        /**
         *或者可以直接这样
         * */
        MyLog.e("url", "www.baidu.com");

        /**
         *根据环境自动选择地址
         * */
        String BaseUrl = isRelease ? "www.baidu.com" : "www.google.com";
        String RequestAPI = isRelease ? "www.alibaba.com" : "www.tencent.com";

    }
}
